clear all
close all

x = 1:10;
S = x(1);
for i = 2:10
    x(i) = x(i-1) + 10;
    S = S +x(i)
end
x
S

S = 10*(x(1)+x(10))/2